package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    提示用户输入一个整数值，然后判定它是否能被 5 和 6 整除，
    是否能被 5 或 6 整除，以及是否能被 5 或6 整除但是不能同时被它们整除
 */
public class Ex3_26 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("Enter an integer: ");
        int num = input.nextInt();
        System.out.println("Is 10 divisible by 5 and 6? " + (num % 5 == 0 && num % 6 == 0));
        System.out.println("Is 10 divisible by 5 or 6? " + (num % 5 == 0 || num % 6 == 0));
        System.out.println("Is 10 divisible by 5 or 6, but not both? " + (num % 5 == 0 || num % 6 == 0));


        input.close();
    }
}
